require('./init.scss')
spin = require('./src.coffee')

n = 0
t = 0
window.Spin = {
    inc: =>
        if not n
            t = setTimeout(
                ->
                    spin.start()
                300
            )
        n += 1
        return
    done: =>
        n -= 1
        if not n
            clearTimeout t
            spin.done()
        if n < 0
            n = 0
        return
}

